;;; package --- Summary
;;; Commentary:
;;; Code:

;; tab width
(setq indent-tabs-mode nil)
(setq default-tab-width 2)
(setq c-basic-offset 2)

;; share clipboard
(setq x-select-enable-clipboard t)

;; echo the command more quickly, default is 1 seconds
(setq echo-keystrokes 0.3)

;; enable debug-on-error feature
;(setq debug-on-error nil)

;; disable the display of scroll bars
(scroll-bar-mode -1)

;; font size only for GUI, terminal font set by iTerm2
;; http://emacswiki.org/emacs/SetFonts#toc12
(when (eq system-type 'darwin)
      ;; default Latin font (e.g. Monaco)
      (set-face-attribute 'default nil :family "Monaco")
      ;; default font size (point * 10)
      ;;
      ;; WARNING!  Depending on the default font,
      ;; if the size is not supported very well, the frame will be clipped
      ;; so that the beginning of the buffer may not be visible correctly. 
      (set-face-attribute 'default nil :height 130))

;; switch windows more quickly
(prelude-require-packages '(switch-window))
(require 'switch-window)
(global-set-key (kbd "C-x o") 'switch-window)

;; json indent width
(setq js-indent-level 2)
(setq json-reformat:indent-width 2)

;; poor ido matching performance on large datasets
;; lower flx-ido-threshold to ensure a smooth experience
(setq flx-ido-threshold 1000)

;; rust-mode custom settings
(setq rust-indent-offset 2)
;(setq racer-rust-src-path (expand-file-name "~/Sources/rust/src"))
;(setq racer-cmd (expand-file-name "~/Sources/racer/target/release/racer"))

;;; custom settings, have fun. :)
;;; custom.el ends here
